From 136d4776ec3f6877cbfce53cdaa9917be5530fe7 Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Sun, 16 Sep 2001 23:54:37 +0000 Subject: [PATCH] add generated files to ignore list. 2001-09-16 James Henstridge * .cvsignore: add generated files to ignore list. * gdk-pixbuf.h: include gdk-pixbuf-enum-types.h * Makefile.am: add rules to build gdk-pixbuf-enum-types.[ch] --- gdk-pixbuf/.cvsignore | 2 ++ gdk-pixbuf/ChangeLog | 8 ++++++++ gdk-pixbuf/Makefile.am | 44 +++++++++++++++++++++++++++++++++++++++-- gdk-pixbuf/gdk-pixbuf.h | 1 + 4 files changed, 53 insertions(+), 2 deletions(-) diff --git a/gdk-pixbuf/.cvsignore b/gdk-pixbuf/.cvsignore index 8e5094d52a..6c44adc194 100644 --- a/gdk-pixbuf/.cvsignore +++ b/gdk-pixbuf/.cvsignore @@ -15,3 +15,5 @@ stamp-gdk-pixbuf-marshal.h test-gdk-pixbuf test-loaders gdk-pixbuf-features.h +gdk-pixbuf-enum-types.[ch] +s-enum-types-[ch] diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 14d1ad947c..ee7120be4b 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,11 @@ +2001-09-16 James Henstridge + + * .cvsignore: add generated files to ignore list. + + * gdk-pixbuf.h: include gdk-pixbuf-enum-types.h + + * Makefile.am: add rules to build gdk-pixbuf-enum-types.[ch] + Fri Sep 14 23:22:12 2001 Matthias Clasen * io-pnm.c (pnm_read_header): Use GDK_PIXBUF_ERROR_CORRUPT_IMAGE, diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am index 554a1ab4ac..fad3395478 100644 --- a/gdk-pixbuf/Makefile.am +++ b/gdk-pixbuf/Makefile.am @@ -212,6 +212,11 @@ man_MANS = gdk-pixbuf-csource.1 # +gdk_pixbuf_built_headers = gdk-pixbuf-enum-types.h +gdk_pixbuf_built_cfiles = gdk-pixbuf-enum-types.c + +$(OBJECTS): $(gdk_pixbuf_built_headers) + libgdk_pixbufincludedir = $(includedir)/gtk-2.0/gdk-pixbuf libgdk_pixbuf_1_3_la_SOURCES = @STRIP_BEGIN@ \ @@ -224,6 +229,7 @@ libgdk_pixbuf_1_3_la_SOURCES = @STRIP_BEGIN@ \ gdk-pixbuf-scale.c \ gdk-pixbuf-util.c \ gdk-pixdata.c \ + $(gdk_pixbuf_built_cfiles) \ @STRIP_END@ @@ -237,16 +243,50 @@ libgdk_pixbuf_1_3_la_LDFLAGS = @STRIP_BEGIN@ \ libgdk_pixbuf_1_3_la_LIBADD = pixops/libpixops.la $(builtin_objs) $(GDK_PIXBUF_DEP_LIBS) libgdk_pixbuf_1_3_la_DEPENDENCIES = $(builtin_objs) -libgdk_pixbufinclude_HEADERS = \ +gdk_pixbuf_headers = \ gdk-pixbuf.h \ gdk-pixbuf-loader.h \ - gdk-pixbuf-features.h \ + gdk-pixbuf-features.h + +libgdk_pixbufinclude_HEADERS = \ + $(gdk_pixbuf_headers) \ + $(gdk_pixbuf_built_headers) \ gdk-pixdata.h noinst_HEADERS = \ gdk-pixbuf-io.h \ gdk-pixbuf-private.h +gdk-pixbuf-enum-types.h: s-enum-types-h + @true + +s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) Makefile + ( cd $(srcdir) && glib-mkenums \ + --fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \ + --fprod "/* enumerations from \"@filename@\" */\n" \ + --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ + --ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \ + $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.h \ + && (cmp -s tmp-gdk-pixbuf-enum-types.h $(srcdir)/gdk-pixbuf-enum-types.h || cp tmp-gdk-pixbuf-enum-types.h $(srcdir)/gdk-pixbuf-enum-types.h ) \ + && rm -f tmp-gdk-pixbuf-enum-types.h \ + && echo timestamp > $(@F) + +gdk-pixbuf-enum-types.c: s-enum-types-c + @true + +s-enum-types-c: @REBUILD@ $(gdk_pixbuf_headers) Makefile + ( cd $(srcdir) && glib-mkenums \ + --fhead "#include " \ + --fprod "\n/* enumerations from \"@filename@\" */" \ + --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const GEnumValue values[] = {" \ + --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ + --vtail " { 0, NULL, NULL }\n };\n etype = g_enum_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ + $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.c \ + && (cmp -s tmp-gdk-pixbuf-enum-types.c $(srcdir)/gdk-pixbuf-enum-types.c || cp tmp-gdk-pixbuf-enum-types.c $(srcdir)/gdk-pixbuf-enum-types.c ) \ + && rm -f tmp-gdk-pixbuf-enum-types.c \ + && echo timestamp > $(@F) + + EXTRA_DIST = \ gdk-pixbuf-csource.1 \ makefile.mingw \ diff --git a/gdk-pixbuf/gdk-pixbuf.h b/gdk-pixbuf/gdk-pixbuf.h index 2a32c2fa2b..7d274d9d72 100644 --- a/gdk-pixbuf/gdk-pixbuf.h +++ b/gdk-pixbuf/gdk-pixbuf.h @@ -288,6 +288,7 @@ gboolean gdk_pixbuf_animation_iter_advance (Gd #include +#include -- 2.30.2